package main

import (
	"fmt"
	"sync/atomic"
	"time"
)

var n int32 = 100

func adld() {
	atomic.AddInt32(&n, 1)
}

func sulb() {
	atomic.AddInt32(&n, -1)
}

func main() {
	for i := 0; i < 100; i++ {
		go adld()
		go sulb()
	}

	time.Sleep(time.Second * 3)
	fmt.Printf("i: %v\n", i)

}
